package org.jeecg.modules.user.notice.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.user.notice.service.CarouselService;
import org.jeecg.modules.utils.BikeResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags="轮播图")
@RestController
@RequestMapping("/app/carousel")
@Slf4j
public class CarouselController {

    @Autowired
    private CarouselService carouselService;

    @ApiOperation(value="app轮播图", notes="app轮播图")
    @RequestMapping(value = "/getCarouselList", method = RequestMethod.GET)
    public BikeResult getCarouselList(@RequestParam(value = "type") Integer type,@RequestParam(value = "id",required = false)String id) {
        return carouselService.getCarouselList(type,id);
    }
}
